home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 020a / ansip21b.zip / MUSICODE.TXT < prev    next >
Text File  |  1991-06-12  |  15KB  |  325 lines

  1.  
  2.  
  3.  
  4.  
  5.                                         MUSIC CODES and SOUND CODES REFERENCE
  6.  
  7.       Below is a reference listing of MUSIC CODES and SOUND CODES
  8.       available.  For information on how to use the "Music String
  9.       Syntax", consult the user's manual (file: ANSIPLAY.DOC).
  10.  
  11.       MUSIC CODE SYNTAX:  ESC[MF <music codes or sound codes)> (music note)
  12.                        or ESC[MB <music codes or sound codes)> (music note)
  13.  
  14.                                 OCTAVES AND TONES
  15.                                 -----------------
  16.       A-G  Plays A, B, ..., G in current octave
  17.            # or +  After the note specifies sharp
  18.                 -  After the note specifies flat
  19.         >  Increases octave by 1. Octave cannot go beyond 6.
  20.            >> Increases by 2 octaves, etc.
  21.  
  22.         <  Decreases octave by 1. Octave cannot drop below 0.
  23.            << Decreases by 2 octaves, etc.
  24.  
  25.        OCTAVE:
  26.        On  Sets current octave (0-6)
  27.            Sets the current octave. There are seven octaves,
  28.            numbered 0-6.
  29.  
  30.        NOTE:
  31.        Nn  Plays note n (0-84)
  32.            The range for n is 0-84.  In the seven possible
  33.            octaves, there are 84 notes.  When n = 0, this means a rest.
  34.  
  35.           *(Below is a listing of notes, both by MUSIC CODES and
  36.             by SOUND CODES)
  37.  
  38.  
  39.                             TONE DURATION AND TEMPO
  40.                             -----------------------
  41.       LENGTH:
  42.       Ln  Sets length of a note. (1-64)
  43.           The range for n is 1-64.  L 4 is a quarter note,  L 1 is a
  44.           whole note, etc.
  45.  
  46.           The length may also follow the note when a change of
  47.           length only is desired for a particular note. For
  48.           example,
  49.                    A 16 can be equivalent to L 16 A
  50.  
  51.       TEMPO:
  52.       Tn  Sets number of quarter notes per minute (32-255)
  53.           The range for n is 32-255. The default for n is 120.
  54.  
  55.           Note: Because of the slow clock-interrupt rate, some notes
  56.                 will not play at higher tempos (L 64 at T 255, for
  57.                 example).
  58.  
  59.       MUSIC STACCATO:
  60.       MS  Sets "music staccato" so that each note will play 3/4 of
  61.           the time determined by the length (L).
  62.  
  63.                                       -1-
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.       MUSIC NORMAL:
  71.       MN  Sets "music normal" so that each note will play 7/8 of
  72.           the time determined by the length (L).
  73.  
  74.       MUSIC LEGATO:
  75.       ML  Sets "music legato" so that each note will play the full
  76.           period set by length (L).
  77.  
  78.       PAUSE:
  79.       Pn  Pause for the duration of n quarternotes (1-64)
  80.           Specifies a pause, ranging from 1-64. This option
  81.           corresponds to the length of each note, set with Ln.
  82.  
  83.       DOT:
  84.       .   A period after a note causes the note to play 3/2 times
  85.           the length determined by L (length) times T (tempo). The
  86.           period has the same meaning as in a musical score.
  87.  
  88.           Multiple periods can appear after a note. Each period
  89.           adds a length equal to one half the length of the previous
  90.           period. For example,
  91.                "A."   plays 1 + 1/2 or 3/2 times the length
  92.                "A.."  plays 1 + 1/2 + 1/4 or 7/4 times the length.
  93.  
  94.           Periods can appear after a pause (P). In this case, the
  95.           pause length is scaled in the same way notes are scaled.
  96.  
  97.                                    OPERATION
  98.                                    ---------
  99.       MUSIC FOREGROUND:
  100.       MF  Sets music/sound to run in foreground
  101.  
  102.       MUSIC BACKGROUND:
  103.       MB  Sets music/sound to run in background
  104.  
  105.       See the manual (ANSIPLAY.DOC) for more details on MF and MB.
  106.  
  107.           ========================================================
  108.           LISTING OF TONES, both by MUSIC CODES and by SOUND CODES
  109.           --------------------------------------------------------
  110.  
  111.       Example: The following codes will all yield the same tone...
  112.  
  113.                      MUSIC CODE    ESC[O0 C (music note)
  114.                      MUSIC CODE    ESC[N1 (music note)
  115.                      SOUND CODE    ESC[65.406;8 (music note)
  116.  
  117.  
  118.        IBM              HELMHOLTZ      MUSIC               SOUND
  119.       OCTAVE   NOTE     NOTATION    CODE (NOTE)   =   CODE (FREQUENCY)
  120.       ------ ---------- ---------   -------------     ----------------
  121.                D#,E-                                       38.890
  122.                E                                           41.204
  123.                F                                           43.654
  124.                F#,G-                                       46.250
  125.                G                                           49.000
  126.  
  127.                                       -2-
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.        IBM              HELMHOLTZ      MUSIC               SOUND
  136.       OCTAVE   NOTE     NOTATION    CODE (NOTE)   =   CODE (FREQUENCY)
  137.       ------ ---------- ---------   -------------     ----------------
  138.                G#,A-                                       51.914              
  139.                A                                           55.000
  140.                A#,B-                                       58.270
  141.                B                                           61.736
  142.       -------------------------------------------------------------
  143.       00       C         CC           N1                   65.406
  144.                C#,D-                  N2                   69.296
  145.                D                      N3                   73.416
  146.                D#,E-                  N4                   77.782
  147.                E                      N5                   82.406
  148.                F                      N6                   87.308
  149.                F#,G-                  N7                   92.498
  150.                G                      N8                   97.998
  151.                G#,A-                  N9                  103.826
  152.                A                      N10                 110.000
  153.                A#,B-                  N11                 116.540
  154.                B                      N12                 123.470
  155.       -------------------------------------------------------------
  156.       01       C         C            N13                 130.812
  157.                C#,D-                  N14                 138.592
  158.                D                      N15                 146.832
  159.                D#,E-                  N16                 155.564
  160.                E                      N17                 164.821
  161.                F                      N18                 174.614
  162.                F#,G-                  N19                 185.000
  163.                G                      N20                 195.998
  164.                G#,A-                  N21                 207.660
  165.                A                      N22                 220.000
  166.                A#,B-                  N23                 233.080
  167.                B                      N24                 246.940
  168.       -------------------------------------------------------------
  169.       02       C         c            N25                 261.620
  170.                C#,D-                  N26                 277.180
  171.                D                      N27                 296.660
  172.                D#,E-                  N28                 311.120
  173.                E                      N29                 329.620
  174.                F                      N30                 349.220
  175.                F#,G-                  N31                 370.000
  176.                G                      N32                 392.000
  177.                G#,A-                  N33                 415.300
  178.                A                      N34                 440.000
  179.                A#,B-                  N35                 466.160
  180.                B                      N36                 493.880
  181.       -------------------------------------------------------------
  182.       03       C         c' (middle)  N37                 523.260
  183.                C#,D-                  N38                 554.360
  184.                D                      N39                 587.320
  185.                D#,E-                  N40                 622.260
  186.                E                      N41                 659.260
  187.                F                      N42                 698.460
  188.                F#,G-                  N43                 739.980
  189.                G                      N44                 784.000
  190.                G#,A-                  N45                 830.600
  191.  
  192.  
  193.                                       -3-
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.        IBM              HELMHOLTZ      MUSIC               SOUND
  201.       OCTAVE   NOTE     NOTATION    CODE (NOTE)   =   CODE (FREQUENCY)
  202.       ------ ---------- ---------   -------------     ----------------
  203.                A                      N46                 880.000
  204.                A#,B-                  N47                 892.320
  205.                B                      N48                 987.760
  206.       -------------------------------------------------------------
  207.       04       C         c''          N49                1046.500
  208.       default  C#,D-                  N50                1108.740
  209.       octave   D                      N51                1174.660
  210.                D#,E-                  N52                1244.500
  211.                E                      N53                1318.520
  212.                F                      N54                1396.920
  213.                F#,G-                  N55                1479.980
  214.                G                      N56                1567.980
  215.                G#,A-                  N57                1661.220
  216.                A                      N58                1760.000
  217.                A#,B-                  N59                1864.660
  218.                B                      N60                1975.540
  219.       -------------------------------------------------------------
  220.       05       C         c'''         N61                2093.000
  221.                C#,D-                  N62                2217.400
  222.                D                      N63                2349.400
  223.                D#,E-                  N64                2489.000
  224.                E                      N65                2637.000
  225.                F                      N66                2793.800
  226.                F#,G-                  N67                2960.000
  227.                G                      N68                3136.000
  228.                G#,A-                  N69                3322.400
  229.                A                      N70                3520.000
  230.                A#,B-                  N71                3729.400
  231.                B                      N72                3951.000
  232.       -------------------------------------------------------------
  233.       06       C         c''''        N73                4186.000
  234.                C#,D-                  N74                4435.000
  235.                D                      N75                4698.600
  236.                D#,E-                  N76                4978.000
  237.                E                      N77                5274.000
  238.                F                      N78                5587.600
  239.                F#,G-                  N79                5920.000
  240.                G                      N80                6272.000
  241.                G#,A-                  N81                6644.800
  242.                A                      N82                7040.000
  243.                A#,B-                  N83                7458.600
  244.                B                      N84                7902.200
  245.       -------------------------------------------------------------
  246.                C         cv           -                  8372.000
  247.                C#,D-                  -                  8869.800
  248.                D                      -                  9397.200
  249.                D#,E-                  -                  9956.000
  250.                E                      -                 10548.000
  251.                F                      -                 11175.400
  252.                F#,G-                  -                 11839.800
  253.                G                      -                 12543.800
  254.                G#,A-                  -                 13289.800
  255.                A                      -                 14080.000
  256.  
  257.  
  258.                                       -4-
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.        IBM              HELMHOLTZ      MUSIC               SOUND
  266.       OCTAVE   NOTE     NOTATION    CODE (NOTE)   =   CODE (FREQUENCY)
  267.       ------ ---------- ---------   -------------     ----------------
  268.                A#,B-                  -                 14917.200
  269.                B                      -                 15804.200
  270.       -------------------------------------------------------------
  271.                C                      -                 16744.000
  272.                C#,D-                  -                 17739.600
  273.                D                      -                 18794.600
  274.                D#,E-                  -                 19912.200
  275.                E                      -                 21096.200
  276.                F                      -                 22350.600
  277.                F#,G-                  -                 23679.600
  278.                G                      -                 25083.800
  279.                G#,A-                  -                 26579.400
  280.                A                      -                 28160.000
  281.                A#,B-                  -                 29834.400
  282.                B                      -                 31608.600
  283.  
  284.       =============================================================
  285.  
  286.  
  287.                                                SOUND CODES REFERENCE
  288.  
  289.  
  290.       SOUND CODE SYNTAX:
  291.  
  292.               ESC[MF <FREQ; DURA; CYCLES; DELAY; VARI> (music note)
  293.  
  294.              FREQUENCY          :  a numeric value from 37 to 32,767
  295.                 Frequency is the desired frequency in hertz.
  296.  
  297.              DURATION           :  an numberic value from 0 to 65,535
  298.                 Duration is how long the tone should play, measured
  299.                 in clock ticks. There are 18.2 clock ticks per second
  300.                 regardless of CPU speed.
  301.  
  302.              CYCLES (optional)  :  an integer from 0 to 9,999
  303.                 Cycles is the number of times to repeat the
  304.                 frequency/duration.
  305.  
  306.              DELAY  (optional)  :  an integer from 0 to 999,999,999
  307.                 Delay is the length of pause between cycles.
  308.                 ANSIPLAY will count from 0 to DELAY before proceeding.
  309.  
  310.              VARIATION (optional):  an numeric value from -9,999 to 9,999
  311.                 Variation will change the FREQUENCY each time the tone
  312.                 is repeated using the CYCLES variable.  FREQUENCY will
  313.                 use it's current value, add the VARIATION value to 
  314.                 itself (per cycle) to get a new FREQUENCY, then play
  315.                 the new FREQUENCY.
  316.  
  317.  
  318.       * Note: also see the file ANSICODE.TXT for a listing of
  319.               ANSI escape control codes.
  320.  
  321.                                       -5-
  322.  
  323.       --end of documentation--
  324.  
  325.